package com.isunland.managesystem.ui;

import android.support.v4.app.Fragment;
import com.isunland.managesystem.R;
import com.isunland.managesystem.base.BasePagerActivity;
import com.isunland.managesystem.entity.ProblemBackOriginal;

/**
 * Created by lenovo on 2016/11/17.
 */
public class ProblemBackDetailActivity extends BasePagerActivity {
  private int[] title = { R.string.back_detail, R.string.reply_list };
  private ProblemBackOriginal.ProblemBackContent content;

  /**
   * 第一个Fragment
   */
  @Override protected Fragment createFragmentOne() {
    content = (ProblemBackOriginal.ProblemBackContent) getIntent().getSerializableExtra(
        ProblemBackListFragment.EXTRA_VALUE);
    return ProblemBackDetailFragment.newInstence(content);
  }

  /**
   * 第二个Fragment
   */
  @Override protected Fragment createFragmentTwo() {
    content = (ProblemBackOriginal.ProblemBackContent) getIntent().getSerializableExtra(
        ProblemBackListFragment.EXTRA_VALUE);
    return ProblemReplyListFragment.newInstance(content);
  }

  /**
   * 标题资源字符串的id.
   */
  @Override protected int[] createTitle() {
    return title;
  }
}
